package xcmg.device.infra.enums;

/**
 * @author: xiali@bkrwin.com
 * @description: 预付款状态枚举类
 * @date： 2019/6/12 15:23
 **/
public enum PrepPayBillTypeEnum {
    RECHARGE(0, "充值"),
    SETTLEMENT(1, "结算"),
    RETURN(2, "退货");

    private Integer statusCode;

    private String statusName;

    PrepPayBillTypeEnum(Integer statusCode, String statusName) {
        this.statusCode = statusCode;
        this.statusName = statusName;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public static String getDescByCode(Integer status) {
        for (PrepPayBillTypeEnum statusEnum : PrepPayBillTypeEnum.values()) {
            if (statusEnum.getStatusCode().equals(status)) {
                return statusEnum.getStatusName();
            }
        }
        return RECHARGE.getStatusName();
    }
}
